<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('versions', function (Blueprint $table) {
            $table->id();
            $table->string('version')->default('1.0.0')->comment('版本号');
            $table->string('url')->nullable()->comment('下载地址');
            $table->text('log')->nullable()->comment('更新说明');
            $table->tinyInteger('force')->default(0)->comment('是否强制更新');
            $table->timestamps();
            $table->softDeletes();
            $table->comment('版本表');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('versions');
    }
};
